<?php
/**
 * Created by PhpStorm.
 * User: 技术员专用
 * Date: 2019/3/21
 * Time: 15:50
 */
namespace app\admin\controller;
use app\common\lib\Util;
use think\Controller;

class Image
{
    public function index(){
        $file = request()->file('file');
        $info=$file->move('/www/wwwroot/live/tp5/public/static/upload');
        if ($info){
            $data=[
                'image'=>'http://live.dickycai.top:8811'.'/upload/'.$info->getSaveName(),
            ];
            return Util::show(1,'OK',$data);
        }else{
            return Util::show(0,'ERROR');
        }

    }
}